package com.example.bluetooth;

import android.app.Application;

import com.inuker.bluetooth.library.BluetoothContext;

import java.util.HashMap;
import java.util.Map;

import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

public class MyApp extends Application {

    public static Retrofit retrofit;

    public static Map<String,Object> map = new HashMap<>();

    @Override
    public void onCreate() {
        super.onCreate();
        BluetoothContext.set(this);

        retrofit = new Retrofit.Builder()
                .baseUrl("http://parkinglock.iutr.tech/api/v1/") //设置网络请求的Url地址
                .addConverterFactory(GsonConverterFactory.create()) //设置数据解析器
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                .build();
    }
}
